package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class DaiConfig implements Sequenceable, Serializable {

    @SerializedName("enableServerStitchedDai")
    private boolean isEnableServerStitchedDai;

    public static final Sequenceable.Producer<DaiConfig> CREATOR = new Producer<DaiConfig>() {
        @Override
        public DaiConfig createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            DaiConfig daiConfig = new DaiConfig();
            daiConfig.unmarshalling(parcel);
            return daiConfig;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeBoolean(this.isEnableServerStitchedDai);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.isEnableServerStitchedDai=parcel.readBoolean();
        return true;
    }

    @Override
    public String toString() {
        return "DaiConfig{" +
                "enableServerStitchedDai = '" + isEnableServerStitchedDai + '\'' +
                "}";
    }

    public boolean isEnableServerStitchedDai() {
        return isEnableServerStitchedDai;
    }

    public void setEnableServerStitchedDai(boolean enableServerStitchedDai) {
        isEnableServerStitchedDai = enableServerStitchedDai;
    }
}
